<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>饮茶时间</title>
  <style>
    body, div, p {
      margin: 0;
      border: 0;
      padding: 0;
    }

    #app {
      width: 100vw;
      height: 100vh;
    }
  </style>
</head>
<body>
  <div id="app" style="background-color:#384E78;">
    <svg id="container" xmlns="http://www.w3.org/2000/" width="100vw" height="100vh" viewBox="0 0 300 900" style="overflow: hidden;transform: translateX(0)">
      <!-- <rect x="0" y="0" width="100%" height="100%" fill="grey"></rect> -->
      <g>
        <circle id="bg-circle-back" cx="150" cy="450" r="600" fill="#384E78"></circle>
        <circle id="bg-circle-front" cx="150" cy="450" r="60" fill="#5874DC"></circle>
      </g>
      <g>
        <mask id="maskstraw">
          <rect id="maskstraw-rect" x="0" y="300" width="400" height="900" fill="white"></rect>
        </mask>
        <mask id="maskwaterwave">
          <polygon id="maskwaterwave-path" points="25,240 275,240 240,590 60,590" fill="white"></polygon>
        </mask>
        <polygon id="cup-body" points="15,240 285,240 250,600 50,600" fill="#FA9284"></polygon>
        <g mask="url(#maskwaterwave)">
          <path id="cup-body-wtaer" d="M 0 300 V 600 H 400 V 300 H 0 Z" fill="#FFDC9B" >
            <animate
              id="maskwaterwave-anim" begin="indefinite" repeatCount="3" fill="#FFDC9B" attributeName="d" dur="1s" attributeType="XML"
              values="
                M 0 300 V 600 H 400 V 300 H 0 Z;
                M 0 300 V 600 H 400 V 300 C 300 300 100 300 0 300 Z;
                M 0 300 V 600 H 400 V 300 C 300 307 100 293 0 300 Z;
                M 0 300 V 600 H 400 V 300 C 300 315 100 285 0 300 Z;
                M 0 300 V 600 H 400 V 300 C 300 307 100 293 0 300 Z;
                M 0 300 V 600 H 400 V 300 C 300 300 100 300 0 300 Z
              "
              >
            </animate>
          </path>
        </g>
        <polygon id="cup-straw" points="60,585 75,585 265,104 250,100" fill="#6AA89C"></polygon>
        <polygon id="cup-straw-inner" points="62,585 73,585 263,104 252,100" fill="#FFDC9B" mask="url(#maskstraw)"></polygon>
        <rect id="cup-head" x="0" y="200" width="300" height="40" fill="#E06C78"></rect>
      </g>
    </svg>
    <audio id="drink-audio" src="./assets/audios/drink.wav"></audio>
  </div>
  <script type="module" src="./index.js"></script>
</body>
</html>
